package com.example.demo.service;

import com.example.demo.entity.Stu;
import com.example.demo.mapper.StuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class StuService {
    @Autowired
    private StuMapper stuMapper;


    @Transactional(propagation = Propagation.REQUIRED)
    public Integer add(Stu stu){
        return stuMapper.add(stu);
    }
}
